import java.util.Scanner;

public class Test14 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入班级人数：");

        int number = sc.nextInt();
        int number1 = number -1;
        double[] next = new double[number + 1];
        double[] next2 = new double[number];
        double next1 = 0;
        for (int i = 1; i <= number; i++) {
            System.out.print("请输入学号是" + i + "学生的成绩");
             next[i] = sc.nextDouble();
        }
        for (int i = 0; i < number; i++) {
            next1 += next[i];
        }
        System.out.println("全班平均成绩为：" + next1/number1);

        int k = 0,o = 0,p = 0,l = 0;
        for (int i = 0; i < number; i++) {
            next2[i]=next[i];
            if (next2[i] > 80){
                k = k + 1;
            }else if (next2[i] > 70){
                o = o +1;
            }else if (next2[i] > 60){
                p = p +1;
            }else {
                l = l + 1;
            }
        }
        System.out.println("成绩大于80分：" + k);
        System.out.println("成绩大于70分：" + o);
        System.out.println("成绩大于60分：" + p);
        System.out.println("成绩不及格：" + l);


    }
}
